package com.abc.core.util;

import com.abc.core.instance.bo.Cell;
import com.abc.core.instance.bo.Inst;

public class InstVisitor {

    public static void visitInst(Inst inst, VisitInstInf visitor) {
        if (inst == null) {
            visitor.visit(inst);
        }

        for (Cell cell : inst.getCells()) {
            for (Inst childInst : cell.getChildren().values()) {
                visitInst(childInst, visitor);
            }
        }
    }
}
